import Layout from '../../layout/Index'

export default [
    {
        path: '/',
        redirect: '/login'
    },
    {
        path: '/login',
        name: 'login',
        component: () => import(/* webpackChunkName: "login" */ '@/views/Login')
    },
    {
        path: '/changePassword',
        name: 'changePassword',
        component: () => import(/* webpackChunkName: "changePwd" */ '@/views/ChangePwd'),
    },
    {
        path: '/',
        component: Layout,
        children: [
            {
                path: '/home',
                name: 'home',
                component: () => import(/* webpackChunkName: "managerIndex" */ '@/views/Home'),
                meta: { title: '主页' }
            },
            {
                path: '/manager/tenantManage',
                name: 'tenantManage',
                component: () => import(/* webpackChunkName: "tenantManage" */ '@/views/manager/TenantManage'),
                meta: { title: '租户管理' }
            },
            {
                path: '/tenant/userManage',
                name: 'userManage',
                component: () => import(/* webpackChunkName: "userManage" */ '@/views/tenant/UserManage'),
                meta: { role: 'tenant', title: '用户管理' }
            },
            {
                path: '/auditLog',
                name: 'auditLog',
                component: () => import(/* webpackChunkName: "auditLog" */ '@/views/manager/AuditLog'),
                meta: { title: '审计日志' },
            },
            {
                path: '/auditLogDetail/:id',
                name: 'auditLogDetail',
                component: () => import(/* webpackChunkName: "auditLogDetail" */ '@/views/manager/AuditLogDetail'),
                meta: { title: '审计日志详情', activeMenu: '/auditLog' },
            },
            {
                path: '/systemCheck',
                name: 'systemCheck',
                component: () => import(/* webpackChunkName: "systemCheck" */ '@/views/manager/SystemCheck'),
                meta: { title: '系统检测' }
            }
        ]
    },
    {
        path: '/manager/serviceManage',
        component: Layout,
        redirect: '/manager/serviceManage/HDFS',
        name: 'M-serviceManage',
        meta: { title: '资源管理' },
        children: [
            {
                path: 'HDFS',
                name: 'M-S-HDFS',
                component: () => import(/* webpackChunkName: "m-serviceHDFS" */ '@/views/manager/ServiceHDFS'),
                meta: { title: '资源管理-HDFS' }
            },
            {
                path: 'Hive',
                name: 'M-S-Hive',
                component: () => import(/* webpackChunkName: "m-serviceHive" */ '@/views/manager/ServiceHive'),
                meta: { title: '资源管理-Hive' }
            },
            {
                path: 'HBase',
                name: 'M-S-HBase',
                component: () => import(/* webpackChunkName: "m-serviceHBase" */ '@/views/manager/ServiceHBase'),
                meta: { title: '资源管理-HBase' }
            },
            {
                path: 'Yarn',
                name: 'M-S-Yarn',
                component: () => import(/* webpackChunkName: "m-serviceYarn" */ '@/views/manager/ServiceYarn'),
                meta: { title: '资源管理-Yarn' }
            },
            {
                path: 'Kafka',
                name: 'M-S-Kafka',
                component: () => import(/* webpackChunkName: "m-serviceKafka" */ '@/views/resource/ServiceKafka'),
                meta: { title: '资源管理-Kafka' }
            }
        ]
    },
  
    {
      path: '/authority',
      component: Layout,
      redirect: '/authority/HDFS',
      name: 'authorityManage',
      meta: { title: '权限管理' },
      children: [
        {
            path: 'HDFS',
            name: 'auth-HDFS',
            component: () => import(/* webpackChunkName: "authorityHDFS" */ '@/views/authority/Hdfs'),
            meta: { title: '权限管理-HDFS', service: 'HDFS' }
        },
        {
            path: 'Hive',
            name: 'auth-Hive',
            component: () => import(/* webpackChunkName: "authorityHive" */ '@/views/authority/Hive'),
            meta: { title: '权限管理-Hive', service: 'HIVE' }
        },
        {
            path: 'HBase',
            name: 'auth-HBase',
            component: () => import(/* webpackChunkName: "authorityHBase" */ '@/views/authority/Hbase'),
            meta: { title: '权限管理-HBase', service: 'HBASE' }
        },
        {
            path: 'Yarn',
            name: 'auth-Yarn',
            component: () => import(/* webpackChunkName: "authorityYarn" */ '@/views/authority/Yarn'),
            meta: { title: '权限管理-Yarn', service: 'YARN' }
        },
        {
            path: 'Kafka',
            name: 'auth-Kafka',
            component: () => import(/* webpackChunkName: "authorityKafka" */ '@/views/authority/Kafka'),
            meta: { title: '权限管理-Kafka', service: 'KAFKA' }
        }
      ]
    },

    {
        path: '/tenant/serviceManage',
        component: Layout,
        redirect: '/tenant/serviceManage/HDFS',
        name: 'T-serviceManage',
        meta: { title: '资源管理' },
        children: [
            {
                path: 'HDFS',
                name: 'T-S-HDFS',
                component: () => import(/* webpackChunkName: "t-serviceHDFS" */ '@/views/tenant/ServiceHDFS'),
                meta: { title: '资源管理-HDFS' }
            },
            {
                path: 'Hive',
                name: 'T-S-Hive',
                component: () => import(/* webpackChunkName: "t-serviceHive" */ '@/views/tenant/ServiceHive'),
                meta: { title: '资源管理-Hive' }
            },
            {
                path: 'HBase',
                name: 'T-S-HBase',
                component: () => import(/* webpackChunkName: "t-serviceHBase" */ '@/views/tenant/ServiceHBase'),
                meta: { title: '资源管理-HBase' }
            },
            {
                path: 'Yarn',
                name: 'T-S-Yarn',
                component: () => import(/* webpackChunkName: "t-serviceYarn" */ '@/views/tenant/ServiceYarn'),
                meta: { title: '资源管理-Yarn' }
            },
            {
                path: 'Kafka',
                name: 'T-S-Kafka',
                component: () => import(/* webpackChunkName: "t-serviceKafka" */ '@/views/resource/ServiceKafka'),
                meta: { title: '资源管理-Kafka' }
            }
        ]
    },
    {
        path: '/',
        component: Layout,
        redirect: '/HDFS',
        children: [
            {
                path: '/HDFS',
                name: 'HDFS',
                component: () => import(/* webpackChunkName: "HDFS" */ '@/views/user/HDFS'),
                meta: { title: 'HDFS' }
            },
            {
                path: '/Hive',
                name: 'Hive',
                component: () => import(/* webpackChunkName: "Hive" */ '@/views/user/Hive'),
                meta: { title: 'Hive' }
            },
            {
                path: '/HBase',
                name: 'HBase',
                component: () => import(/* webpackChunkName: "HBase" */ '@/views/user/HBase'),
                meta: { title: 'HBase' }
            },
            {
                path: '/Yarn',
                name: 'Yarn',
                component: () => import(/* webpackChunkName: "Yarn" */ '@/views/user/Yarn'),
                meta: { title: 'Yarn' }
            },
            {
                path: '/Kafka',
                name: 'Kafka',
                component: () => import(/* webpackChunkName: "Kafka" */ '@/views/resource/ServiceKafka'),
                meta: { title: 'Kafka' }
            }
        ]
    },
  
    // 别的最后处理
    //   { path: '*', redirect: '/home' }
]
